package Test6;

public class Student extends Person{
    private String stuNum;
    private String day;
    private String major;

    public Student() {
    }
    public Student(String name, String sex, int age, String stuNum, String day, String major) {
        super(name, sex, age);
        this.stuNum = stuNum;
        this.day = day;
        this.major = major;
    }
    public String getStuNum() {
        return stuNum;
    }
    public void setStuNum(String stuNum) {
        this.stuNum = stuNum;
    }
    public String getDay() {
        return day;
    }
    public void setDay(String day) {
        this.day = day;
    }
    public String getMajor() {
        return major;
    }
    public void setMajor(String major) {
        this.major = major;
    }

    @Override
    public String toString() {
        return "姓名:"+super.getName()+"，性别:"+super.getSex()+"，年龄:"+super.getAge()+" 学号:"+this.getStuNum()+"，入学时间:"+this.getDay()+"，专业:"+this.getMajor();
    }
}
